/* Copyright (C) 2019. Huawei Technologies Co., Ltd. All rights reserved.
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the Apache License Version 2.0.
 * You may not use this file except in compliance with the License.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * Apache License for more details at
 * http://www.apache.org/licenses/LICENSE-2.0
 */

#include "register/register.h"
#include <string>
namespace domi {
Status ParseParamsScatterElements(const ge::Operator& op_src, ge::Operator& op_dest) {
  	int axis = -2;
        op_dest.SetAttr("axis",axis);
	string reduce = "none";
	op_dest.SetAttr("reduce",reduce);
	return SUCCESS;
}

REGISTER_CUSTOM_OP("Scatter")
    .FrameworkType(ONNX)
    .OriginOpType({ge::AscendString("ai.onnx::14::ScatterElements"),
                   ge::AscendString("ai.onnx::15::ScatterElements"),
                   ge::AscendString("ai.onnx::10::ScatterElements"),
                   ge::AscendString("ai.onnx::11::ScatterElements"),
                   ge::AscendString("ai.onnx::12::ScatterElements"),
                   ge::AscendString("ai.onnx::13::ScatterElements")})
    .ParseParamsByOperatorFn(ParseParamsScatterElements)
    .ImplyType(ImplyType::TVM);
}  // namespace domi

